package com.fengyun.scala

/**
 * @author Hanpeng
 * @date 2021/1/25 12:41
 * @description: 这是一个注解,被用作参数名称前面,表明这个参数被废弃了。生成一个废弃警告
 */
object TestdeprecatedName {
  def main(args: Array[String]): Unit = {
    //Warning:scalac: there was one deprecation warning; re-run with -deprecation for details
    inc(1, y = 2)
  }
  def inc(x: Int, @deprecatedName('y) n: Int): Int = x + n

}
